import { createRouter, createWebHistory } from "vue-router";
import User from "../view/User.vue";
import Menu from "../view/Menu.vue";
import Login from '../view/Login.vue'
import Index from '../view/Index.vue'
import ToList from '../view/ToList.vue'
const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: "/", component: Index,redirect:'/login',
            children:[
                {
                    path: "/user", component: User,
                },
                {
                    path: "/login", component: Login,
                },
                {
                    path: "/toList", component: ToList,
                },
                {
                    path:'/shop',component:()=>import('../view/shop.vue')
                },
                {
                    path:'/from',component:()=>import('../view/Form.vue')
                },
                {
                    path:'/TodoListTow',component:()=>import('../view/TodoListTow.vue')
                }
            ]
        }
      
    ]
})

export default router